<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>hashcat-3.201: H:/TDDownload/Hashcat v3.20/hashcat-3.201/src/main_shared.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">hashcat-3.201
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_06fe396e3e859736df6d43ad26baa72e.html">hashcat-3.201</a></li><li class="navelem"><a class="el" href="dir_9ce3dfc5d638c7f8b2c4ec0f6627771b.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">main_shared.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;common.h&quot;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;assert.h&gt;</code><br />
<code>#include &quot;types.h&quot;</code><br />
<code>#include &quot;memory.h&quot;</code><br />
<code>#include &quot;user_options.h&quot;</code><br />
<code>#include &quot;hashcat.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for main_shared.c:</div>
<div class="dyncontent">
<div class="center"><img src="main__shared_8c__incl.gif" border="0" usemap="#_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2main__shared_8c" alt=""/></div>
<map name="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2main__shared_8c" id="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2main__shared_8c">
<area shape="rect"  title=" " alt="" coords="243,5,405,61"/>
<area shape="rect"  title=" " alt="" coords="5,109,88,136"/>
<area shape="rect"  title=" " alt="" coords="112,109,173,136"/>
<area shape="rect"  title=" " alt="" coords="197,109,267,136"/>
<area shape="rect"  title=" " alt="" coords="291,109,357,136"/>
<area shape="rect"  title=" " alt="" coords="381,109,461,136"/>
<area shape="rect"  title=" " alt="" coords="485,109,592,136"/>
<area shape="rect"  title=" " alt="" coords="617,109,695,136"/>
</map>
</div>
</div>
<p><a href="main__shared_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aee0ffb60de12a2149c38d0edb63c6873"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main__shared_8c.html#aee0ffb60de12a2149c38d0edb63c6873">main_cracker_hash_cracked</a> (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)</td></tr>
<tr class="separator:aee0ffb60de12a2149c38d0edb63c6873"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73c3170c7171851eb6e8f5a402599423"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main__shared_8c.html#a73c3170c7171851eb6e8f5a402599423">event</a> (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size_t len)</td></tr>
<tr class="separator:a73c3170c7171851eb6e8f5a402599423"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae96d7808ccfe95bbec7a55e2ada91935"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main__shared_8c.html#ae96d7808ccfe95bbec7a55e2ada91935">main</a> (MAYBE_UNUSED int argc, MAYBE_UNUSED char **argv)</td></tr>
<tr class="separator:ae96d7808ccfe95bbec7a55e2ada91935"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a73c3170c7171851eb6e8f5a402599423"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73c3170c7171851eb6e8f5a402599423">&#9670;&nbsp;</a></span>event()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void event </td>
          <td>(</td>
          <td class="paramtype">const u32&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="main__shared_8c_source.html#l00026">26</a> of file <a class="el" href="main__shared_8c_source.html">main_shared.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <span class="keywordflow">switch</span> (<span class="keywordtype">id</span>)</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  {</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordflow">case</span> EVENT_CRACKER_HASH_CRACKED: <a class="code" href="main__shared_8c.html#aee0ffb60de12a2149c38d0edb63c6873">main_cracker_hash_cracked</a> (hashcat_ctx, buf, len); <span class="keywordflow">break</span>;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  }</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;}</div><div class="ttc" id="main__shared_8c_html_aee0ffb60de12a2149c38d0edb63c6873"><div class="ttname"><a href="main__shared_8c.html#aee0ffb60de12a2149c38d0edb63c6873">main_cracker_hash_cracked</a></div><div class="ttdeci">static void main_cracker_hash_cracked(MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)</div><div class="ttdef"><b>Definition:</b> <a href="main__shared_8c_source.html#l00016">main_shared.c:16</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="main__shared_8c_source.html#l00016">main_cracker_hash_cracked()</a>.</p>

<p class="reference">Referenced by <a class="el" href="main__shared_8c_source.html#l00034">main()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="main__shared_8c_a73c3170c7171851eb6e8f5a402599423_cgraph.gif" border="0" usemap="#main__shared_8c_a73c3170c7171851eb6e8f5a402599423_cgraph" alt=""/></div>
<map name="main__shared_8c_a73c3170c7171851eb6e8f5a402599423_cgraph" id="main__shared_8c_a73c3170c7171851eb6e8f5a402599423_cgraph">
<area shape="rect"  title=" " alt="" coords="5,5,57,32"/>
<area shape="rect"  href="main__shared_8c.html#aee0ffb60de12a2149c38d0edb63c6873" title=" " alt="" coords="105,5,293,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="main__shared_8c_a73c3170c7171851eb6e8f5a402599423_icgraph.gif" border="0" usemap="#main__shared_8c_a73c3170c7171851eb6e8f5a402599423_icgraph" alt=""/></div>
<map name="main__shared_8c_a73c3170c7171851eb6e8f5a402599423_icgraph" id="main__shared_8c_a73c3170c7171851eb6e8f5a402599423_icgraph">
<area shape="rect"  title=" " alt="" coords="104,5,156,32"/>
<area shape="rect"  href="main__shared_8c.html#ae96d7808ccfe95bbec7a55e2ada91935" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="ae96d7808ccfe95bbec7a55e2ada91935"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae96d7808ccfe95bbec7a55e2ada91935">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">MAYBE_UNUSED int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MAYBE_UNUSED char **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="main__shared_8c_source.html#l00034">34</a> of file <a class="el" href="main__shared_8c_source.html">main_shared.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="comment">// hashcat main context</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  hashcat_ctx_t *hashcat_ctx = (hashcat_ctx_t *) malloc (<span class="keyword">sizeof</span> (hashcat_ctx_t));</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  assert (hashcat_ctx);</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">int</span> rc_hashcat_init = <a class="code" href="hashcat_8c.html#ade4c61ccaafb16eae04c7d4b727942f3">hashcat_init</a> (hashcat_ctx, <a class="code" href="main__shared_8c.html#a73c3170c7171851eb6e8f5a402599423">event</a>);</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  <span class="keywordflow">if</span> (rc_hashcat_init == -1) <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <span class="comment">// this is a bit ugly, but it&#39;s the example you&#39;re looking for</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  <span class="keywordtype">char</span> *hash = <span class="stringliteral">&quot;8743b52063cd84097a65d1633f5c74f5&quot;</span>;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <span class="keywordtype">char</span> *mask = <span class="stringliteral">&quot;?l?l?l?l?l?l?l&quot;</span>;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <span class="keywordtype">char</span> *hc_argv[] = { hash, mask, NULL };</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <span class="comment">// initialize the user options with some defaults (you can override them later)</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">int</span> rc_options_init = <a class="code" href="user__options_8c.html#a513f025e0c8f5be1d95c9f1ecafbf3de">user_options_init</a> (hashcat_ctx);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="keywordflow">if</span> (rc_options_init == -1) <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  <span class="comment">// your own stuff</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  user_options_t *user_options = hashcat_ctx-&gt;user_options;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  user_options-&gt;hc_argv           = hc_argv;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  user_options-&gt;hc_argc           = 2;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  user_options-&gt;quiet             = <span class="keyword">true</span>;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  user_options-&gt;potfile_disable   = <span class="keyword">true</span>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  user_options-&gt;attack_mode       = ATTACK_MODE_BF; <span class="comment">// this is -a 3</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  user_options-&gt;hash_mode         = 0;              <span class="comment">// MD5</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  user_options-&gt;workload_profile  = 3;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <span class="comment">// init a hashcat session; this initializes opencl devices, hwmon, etc</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="comment">// it does not actually run the attack but from here you can access opencl devices and hwmon information</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">int</span> rc_init = <a class="code" href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d">hashcat_session_init</a> (hashcat_ctx, NULL, NULL, 0, NULL, 0);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <span class="keywordflow">if</span> (rc_init == 0)</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  {</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="comment">// this one actually starts the cracking</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> rc_run = <a class="code" href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168">hashcat_session_execute</a> (hashcat_ctx);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordflow">if</span> (rc_run == 0)</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      hashcat_status_t hashcat_status;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;      <a class="code" href="hashcat_8c.html#a325cba22ef98f99a706d99c65989a2c2">hashcat_get_status</a> (hashcat_ctx, &amp;hashcat_status);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;      printf (<span class="stringliteral">&quot;Session: %s\n&quot;</span>, hashcat_status.session);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;      printf (<span class="stringliteral">&quot;Status: %s\n&quot;</span>,  hashcat_status.status_string);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    }</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (rc_run == -1)</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    {</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      <span class="keywordtype">char</span> *msg = <a class="code" href="hashcat_8c.html#ae5cb2ec9630f0f735bd5783bde52f4b6">hashcat_get_log</a> (hashcat_ctx);</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      fprintf (stderr, <span class="stringliteral">&quot;%s\n&quot;</span>, msg);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  }</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  <span class="keywordflow">else</span></div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  {</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordtype">char</span> *msg = <a class="code" href="hashcat_8c.html#ae5cb2ec9630f0f735bd5783bde52f4b6">hashcat_get_log</a> (hashcat_ctx);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    fprintf (stderr, <span class="stringliteral">&quot;%s\n&quot;</span>, msg);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  }</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="comment">// always destroy those regardless of what the returncodes from the init functions are</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <a class="code" href="hashcat_8c.html#aac7de5dfb85c0aa9bccebf9782855ffa">hashcat_session_destroy</a> (hashcat_ctx);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  <a class="code" href="hashcat_8c.html#a0f3e5c3821b49ad09d6ef5df7bda00a3">hashcat_destroy</a> (hashcat_ctx);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  free (hashcat_ctx);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}</div><div class="ttc" id="hashcat_8c_html_ae5cb2ec9630f0f735bd5783bde52f4b6"><div class="ttname"><a href="hashcat_8c.html#ae5cb2ec9630f0f735bd5783bde52f4b6">hashcat_get_log</a></div><div class="ttdeci">char * hashcat_get_log(hashcat_ctx_t *hashcat_ctx)</div><div class="ttdef"><b>Definition:</b> <a href="hashcat_8c_source.html#l01158">hashcat.c:1158</a></div></div>
<div class="ttc" id="hashcat_8c_html_ade4c61ccaafb16eae04c7d4b727942f3"><div class="ttname"><a href="hashcat_8c.html#ade4c61ccaafb16eae04c7d4b727942f3">hashcat_init</a></div><div class="ttdeci">int hashcat_init(hashcat_ctx_t *hashcat_ctx, void(*event)(const u32, struct hashcat_ctx *, const void *, const size_t))</div><div class="ttdef"><b>Definition:</b> <a href="hashcat_8c_source.html#l00761">hashcat.c:761</a></div></div>
<div class="ttc" id="hashcat_8c_html_aac7de5dfb85c0aa9bccebf9782855ffa"><div class="ttname"><a href="hashcat_8c.html#aac7de5dfb85c0aa9bccebf9782855ffa">hashcat_session_destroy</a></div><div class="ttdeci">int hashcat_session_destroy(hashcat_ctx_t *hashcat_ctx)</div><div class="ttdef"><b>Definition:</b> <a href="hashcat_8c_source.html#l01134">hashcat.c:1134</a></div></div>
<div class="ttc" id="user__options_8c_html_a513f025e0c8f5be1d95c9f1ecafbf3de"><div class="ttname"><a href="user__options_8c.html#a513f025e0c8f5be1d95c9f1ecafbf3de">user_options_init</a></div><div class="ttdeci">int user_options_init(hashcat_ctx_t *hashcat_ctx)</div><div class="ttdef"><b>Definition:</b> <a href="user__options_8c_source.html#l00114">user_options.c:114</a></div></div>
<div class="ttc" id="main__shared_8c_html_a73c3170c7171851eb6e8f5a402599423"><div class="ttname"><a href="main__shared_8c.html#a73c3170c7171851eb6e8f5a402599423">event</a></div><div class="ttdeci">static void event(const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size_t len)</div><div class="ttdef"><b>Definition:</b> <a href="main__shared_8c_source.html#l00026">main_shared.c:26</a></div></div>
<div class="ttc" id="hashcat_8c_html_a9f3f1b757bdc2a874b4bb0dc657bde1d"><div class="ttname"><a href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d">hashcat_session_init</a></div><div class="ttdeci">int hashcat_session_init(hashcat_ctx_t *hashcat_ctx, char *install_folder, char *shared_folder, int argc, char **argv, const int comptime)</div><div class="ttdef"><b>Definition:</b> <a href="hashcat_8c_source.html#l00833">hashcat.c:833</a></div></div>
<div class="ttc" id="hashcat_8c_html_a0f3e5c3821b49ad09d6ef5df7bda00a3"><div class="ttname"><a href="hashcat_8c.html#a0f3e5c3821b49ad09d6ef5df7bda00a3">hashcat_destroy</a></div><div class="ttdeci">void hashcat_destroy(hashcat_ctx_t *hashcat_ctx)</div><div class="ttdef"><b>Definition:</b> <a href="hashcat_8c_source.html#l00802">hashcat.c:802</a></div></div>
<div class="ttc" id="hashcat_8c_html_ac49fece3f82732fda9eb29766cc01168"><div class="ttname"><a href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168">hashcat_session_execute</a></div><div class="ttdeci">int hashcat_session_execute(hashcat_ctx_t *hashcat_ctx)</div><div class="ttdef"><b>Definition:</b> <a href="hashcat_8c_source.html#l01008">hashcat.c:1008</a></div></div>
<div class="ttc" id="hashcat_8c_html_a325cba22ef98f99a706d99c65989a2c2"><div class="ttname"><a href="hashcat_8c.html#a325cba22ef98f99a706d99c65989a2c2">hashcat_get_status</a></div><div class="ttdeci">int hashcat_get_status(hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_status)</div><div class="ttdef"><b>Definition:</b> <a href="hashcat_8c_source.html#l01165">hashcat.c:1165</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="main__shared_8c_source.html#l00026">event()</a>, <a class="el" href="hashcat_8c_source.html#l00802">hashcat_destroy()</a>, <a class="el" href="hashcat_8c_source.html#l01158">hashcat_get_log()</a>, <a class="el" href="hashcat_8c_source.html#l01165">hashcat_get_status()</a>, <a class="el" href="hashcat_8c_source.html#l00761">hashcat_init()</a>, <a class="el" href="hashcat_8c_source.html#l01134">hashcat_session_destroy()</a>, <a class="el" href="hashcat_8c_source.html#l01008">hashcat_session_execute()</a>, <a class="el" href="hashcat_8c_source.html#l00833">hashcat_session_init()</a>, and <a class="el" href="user__options_8c_source.html#l00114">user_options_init()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="main__shared_8c_ae96d7808ccfe95bbec7a55e2ada91935_cgraph.gif" border="0" usemap="#main__shared_8c_ae96d7808ccfe95bbec7a55e2ada91935_cgraph" alt=""/></div>
<map name="main__shared_8c_ae96d7808ccfe95bbec7a55e2ada91935_cgraph" id="main__shared_8c_ae96d7808ccfe95bbec7a55e2ada91935_cgraph">
<area shape="rect"  title=" " alt="" coords="5,1072,56,1099"/>
<area shape="rect"  href="main__shared_8c.html#a73c3170c7171851eb6e8f5a402599423" title=" " alt="" coords="165,244,217,271"/>
<area shape="rect"  href="hashcat_8c.html#a0f3e5c3821b49ad09d6ef5df7bda00a3" title=" " alt="" coords="131,503,250,529"/>
<area shape="rect"  href="hashcat_8c.html#ae5cb2ec9630f0f735bd5783bde52f4b6" title=" " alt="" coords="132,971,249,997"/>
<area shape="rect"  href="hashcat_8c.html#a325cba22ef98f99a706d99c65989a2c2" title=" " alt="" coords="123,1021,259,1048"/>
<area shape="rect"  href="hashcat_8c.html#ade4c61ccaafb16eae04c7d4b727942f3" title=" " alt="" coords="145,1072,237,1099"/>
<area shape="rect"  href="hashcat_8c.html#aac7de5dfb85c0aa9bccebf9782855ffa" title=" " alt="" coords="105,1123,276,1149"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,1173,277,1200"/>
<area shape="rect"  href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d" title=" " alt="" coords="119,1224,263,1251"/>
<area shape="rect"  href="user__options_8c.html#a513f025e0c8f5be1d95c9f1ecafbf3de" title=" " alt="" coords="131,1275,251,1301"/>
<area shape="rect"  href="main__shared_8c.html#aee0ffb60de12a2149c38d0edb63c6873" title=" " alt="" coords="339,5,527,32"/>
<area shape="rect"  href="memory_8c.html#ad8ba3dcf1734b1d2c8679600f0f0c3c9" title=" " alt="" coords="404,56,461,83"/>
<area shape="rect"  href="status_8c.html#a63a8c00d5bd34caf172084656496c49e" title=" " alt="" coords="345,411,521,437"/>
<area shape="rect"  href="status_8c.html#a2ed1df8a5376cf23d64c50438297c846" title=" " alt="" coords="379,512,487,539"/>
<area shape="rect"  href="status_8c.html#a79965bb7e1be8762347af372ffc22142" title=" " alt="" coords="606,215,767,241"/>
<area shape="rect"  href="status_8c.html#a355cdcb9ede56fee687b8af4a9189d33" title=" " alt="" coords="604,379,769,405"/>
<area shape="rect"  href="status_8c.html#a23b45088a69203f6dace5e4e1e3bb660" title=" " alt="" coords="606,487,767,513"/>
<area shape="rect"  href="status_8c.html#a6aefa07d8d2f81829fd8e25c57e424b5" title=" " alt="" coords="605,664,768,691"/>
<area shape="rect"  href="status_8c.html#a937c114edc2226d183bf313960efc4e8" title=" " alt="" coords="833,639,984,665"/>
<area shape="rect"  href="status_8c.html#a326b937af62db651d3659b5099bea555" title=" " alt="" coords="1032,559,1203,585"/>
<area shape="rect"  href="status_8c.html#aff0117b75fbe12760f5364f225c4ef90" title=" " alt="" coords="1032,719,1203,745"/>
<area shape="rect"  href="status_8c.html#a423d095e28cde7a27728d934ecf1469a" title=" " alt="" coords="603,563,770,589"/>
<area shape="rect"  href="status_8c.html#a8b960dd7a2f536cf0432bf6933d5096b" title=" " alt="" coords="605,613,768,640"/>
<area shape="rect"  href="status_8c.html#a1fe5a4470ba16471b45009f196690e38" title=" " alt="" coords="356,985,509,1026"/>
<area shape="rect"  href="status_8c.html#a2c69a9bdcd774127eeb010c1eda9f71f" title=" " alt="" coords="343,1051,522,1077"/>
<area shape="rect"  href="status_8c.html#a4aac0bc181d9bbeb489e32623aa6e4c8" title=" " alt="" coords="354,1101,511,1128"/>
<area shape="rect"  href="status_8c.html#a6b09beaeb7a341d83ae9ceded9c93ca4" title=" " alt="" coords="349,1152,516,1179"/>
<area shape="rect"  href="status_8c.html#a1ee0a0e0756eadec9054356d89a51289" title=" " alt="" coords="367,1203,499,1245"/>
<area shape="rect"  href="status_8c.html#aaebe6621269740d95c9284bcbb4fc9b4" title=" " alt="" coords="344,1320,521,1347"/>
<area shape="rect"  href="status_8c.html#a9346e74a0f0d9530d4b98e5059533fe4" title=" " alt="" coords="595,1295,778,1321"/>
<area shape="rect"  href="status_8c.html#a1143c80f218b32f866e0cc80ae036bc3" title=" " alt="" coords="353,1371,512,1397"/>
<area shape="rect"  href="status_8c.html#a3545942e77f3a16ee6692a9b634e5f7e" title=" " alt="" coords="357,1421,508,1448"/>
<area shape="rect"  href="status_8c.html#aa8ddf49015e6159eec2f16ac86f81abc" title=" " alt="" coords="337,1807,528,1833"/>
<area shape="rect"  href="status_8c.html#a7663499119b94c965fc82de66f3b39b7" title=" " alt="" coords="588,1836,785,1863"/>
<area shape="rect"  href="status_8c.html#ac13b667f21e4130311dcd81a5f55a1c9" title=" " alt="" coords="347,1589,518,1630"/>
<area shape="rect"  href="status_8c.html#a6e36bff711d78e207b3d047928a85afc" title=" " alt="" coords="354,1655,511,1681"/>
<area shape="rect"  href="status_8c.html#aa4e6bcc5ee09c1853c2c0800ef96f084" title=" " alt="" coords="356,1705,509,1732"/>
<area shape="rect"  href="status_8c.html#a0ce38de7b1ba7a34808185ee942cfc7b" title=" " alt="" coords="610,807,763,849"/>
<area shape="rect"  href="status_8c.html#aee04b2b324a8233c2a9f5eb90b77a6fc" title=" " alt="" coords="610,725,763,766"/>
<area shape="rect"  href="status_8c.html#a04f86af67fd6a4a33d9fc4ca2c0c7072" title=" " alt="" coords="356,766,509,807"/>
<area shape="rect"  href="status_8c.html#a923fe03c8487c12bd656a22d6dc3f0b7" title=" " alt="" coords="325,1908,540,1935"/>
<area shape="rect"  href="status_8c.html#aaa8e4295bc31ebc7504fb56c1cedb071" title=" " alt="" coords="349,1959,517,1985"/>
<area shape="rect"  href="status_8c.html#a025e25f5818055655fe9aa6aa15e01ae" title=" " alt="" coords="354,2010,511,2051"/>
<area shape="rect"  href="status_8c.html#aea022f57472c6b608225b8cf0fd46c38" title=" " alt="" coords="357,2076,508,2103"/>
<area shape="rect"  href="status_8c.html#a4c8b61a209f126345b6370213e3bc3c8" title=" " alt="" coords="611,1669,762,1710"/>
<area shape="rect"  href="status_8c.html#ae1464d56b266870c3dc8ca4d2c5d923e" title=" " alt="" coords="611,1494,762,1535"/>
<area shape="rect"  href="status_8c.html#a12c020c406e1e6d116db03c22aa0b33f" title=" " alt="" coords="357,1523,508,1565"/>
<area shape="rect"  href="status_8c.html#ab62dda3400db92f9e8ac60af9fd69aec" title=" " alt="" coords="354,259,511,285"/>
<area shape="rect"  href="status_8c.html#a73c321551b12c2478bb9fa818f2f7f75" title=" " alt="" coords="333,309,532,336"/>
<area shape="rect"  href="status_8c.html#a25dcb5d0d09beb35c13ff5bcff9fd1cf" title=" " alt="" coords="350,360,515,387"/>
</map>
</div>

</div>
</div>
<a id="aee0ffb60de12a2149c38d0edb63c6873"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee0ffb60de12a2149c38d0edb63c6873">&#9670;&nbsp;</a></span>main_cracker_hash_cracked()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void main_cracker_hash_cracked </td>
          <td>(</td>
          <td class="paramtype">MAYBE_UNUSED hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MAYBE_UNUSED const void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MAYBE_UNUSED const size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Author......: See docs/credits.txt License.....: MIT </p>

<p class="definition">Definition at line <a class="el" href="main__shared_8c_source.html#l00016">16</a> of file <a class="el" href="main__shared_8c_source.html">main_shared.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;{</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  outfile_ctx_t *outfile_ctx = hashcat_ctx-&gt;outfile_ctx;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  <span class="keywordflow">if</span> (outfile_ctx-&gt;fp != NULL) <span class="keywordflow">return</span>; <span class="comment">// cracked hash was not written to an outfile</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  fwrite (buf, len,          1, stdout);</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  fwrite (EOL, strlen (EOL), 1, stdout);</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="main__shared_8c_source.html#l00026">event()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="main__shared_8c_aee0ffb60de12a2149c38d0edb63c6873_icgraph.gif" border="0" usemap="#main__shared_8c_aee0ffb60de12a2149c38d0edb63c6873_icgraph" alt=""/></div>
<map name="main__shared_8c_aee0ffb60de12a2149c38d0edb63c6873_icgraph" id="main__shared_8c_aee0ffb60de12a2149c38d0edb63c6873_icgraph">
<area shape="rect"  title=" " alt="" coords="204,5,392,32"/>
<area shape="rect"  href="main__shared_8c.html#a73c3170c7171851eb6e8f5a402599423" title=" " alt="" coords="104,5,156,32"/>
<area shape="rect"  href="main__shared_8c.html#ae96d7808ccfe95bbec7a55e2ada91935" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
